import request from '@/utils/request'

// 查询契约锁列表
export function rentOutList(query) {
  return request({
    url: '/contractLock/config/list',
    method: 'get',
    params: query
  })
}
//根据名称或者公司代码查询契约锁信息
export function getContractCompanyByNameAndCode(query) {
  return request({
    url: '/contractLock/config/getContractCompanyByNameAndCode',
    method: 'get',
    params: query
  })
}
//同步企业信息
export function synchronizedInfo(data) {
  return request({
    url: '/contractLock/config/synchronizedInfo',
    method: 'post',
    data
  })
}

//更新契约锁信息
export function updateByContractLockIds(data) {
  return request({
    url: '/contractLock/config/updateByContractLockIds',
    method: 'post',
    data
  })
}

//删除出租方配置
export function deleteByContractLockIds(id) {
  return request({
    url: `/contractLock/config/${id}`,
    method: 'delete'
  })
}

//查询组织列表（排除节点）关联出租方
export function rentOutexclude(params) {
  return request({
    url: `/system/dept/list`,
    method: 'GET',
    params
  })
}

//关联出租方提交
export function submitCorrelationCompany(data) {
  return request({
    url: `/contractLock/config/correlationCompany`,
    method: 'post',
    data
  })
}

//新增契约锁签署配置
export function submintAddList(data) {
  return request({
    url: `/contractLock/contractLockSignConfig/addList`,
    method: 'post',
    data
  })
}

//查询契约锁签署配置列表
export function getList(data) {
  return request({
    url: `/contractLock/contractLockSignConfig/getList`,
    method: 'post',
    data:data
  })
}

//获取用户列表
export function getUserList(params) {
  return request({
    url: `/system/user/forUpdate/allList`,
    method: 'get',
    params:params
  })
}

//获取用户列表(未加密)
export function getUserListNoEncrypt(params) {
  return request({
    url: `/system/user/forUpdate/allList`,
    method: 'get',
    params:params
  })
}

//回显契约锁模板信息
export function contractLockSignConfig(data) {
  return request({
    url: `/contractLock/contractLockSignConfig/queryList`,
    method: 'post',
      data
  })
}

//查询合同附件
export function getContractFile(contractId) {
  return request({
    url: `/order/orderContract/getContractFile/${contractId}`,
    method: 'get'
  })
}

//根据出租方id查询配置信息
export function getInfoByDeptId(deptId) {
  return request({
    url: `/contractLock/config/getInfoByDeptId/${deptId}`,
    method: 'get'
  })
}

//
